using System;
using System.Collections.Generic;
using System.Text;

namespace ICSharpCode.TextEditor.Added
{
    public class HightlightEntity
    {
        private bool _dirty;

        public bool Dirty
        {
            get { return _dirty; }
        }

        private bool _loading = true;

        public bool Loading
        {
            get { return _loading; }
            set { _loading = value; }
        }

        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        private string _documentLocation;

        public string DocumentLocation
        {
            get { return _documentLocation; }
            set { _documentLocation = value; }
        }

        private string _tagName;

        public string TagName
        {
            get { return _tagName; }
            set { _tagName = value; }
        }

        private string _attributeName;

        public string AttributeName
        {
            get { return _attributeName; }
            set { _attributeName = value;}
        }

        private string _foreColorName;

        public string ForeColorName
        {
            get { return _foreColorName; }
            set 
            {
                if (_foreColorName != value)
                {
                    _foreColorName = value;
                    SetDirtryIfNotLoading();
                }
            }
        }

        private string _backColorName;

        public string BackColorName
        {
            get { return _backColorName; }
            set 
            {
                if (_backColorName != value)
                {
                    _backColorName = value;
                    SetDirtryIfNotLoading();
                }
            }
        }	

        public override string ToString()
        {
            return _name;
        }

        private void SetDirtryIfNotLoading()
        {
            if (!_loading)
            {
                _dirty = true;
            }
        }

    }
}
